//login.ts
import http from '@/service/http'
import api from './api'

const requestList = {
    loginApi:(params?:any) =>{
        return http.post(api.login, params)
    },
    captchaApi:(params?:any) =>{
        return http.get(api.captcha, params)
    },
    userInfoApi:()=>{
        return http.get(api.userInfo)
    },
    refreshTokenApi:(params?:any)=>{
        return http.post(api.refreshToken,params)
    },

    registerApi:(params?:any)=>{
        return http.post(api.register,params)
    },

    userListApi:(params?:any)=>{
        return http.post(api.getUsers,params)
    },
    updateAvatarApi:(params?:any)=>{
        return http.post(api.updateAvatar,params)
    },
    updateUsernameApi:(params?:any)=>{
        return http.post(api.updateUsername,params)
    },
    updatePsdApi:(params?:any)=>{
        return http.post(api.updatePsd,params)
    },
    updateOtherMsgApi:(params?:any)=>{
        return http.post(api.updateOtherMsg,params)
    },



    //标签
    tagListApi:(params?:any)=>{
        return http.post(api.tagsList,params)
    },

    //文章
    articleListApi:(params?:any)=>{
        return http.post(api.articleList,params)
    },
    createArticleApi:(params?:any)=>{
        return http.post(api.createArticle,params)
    },
    getArticleByIdApi:(params?:any)=>{
        return http.post(api.getArticleById,params)
    },
    getReCommentArticleApi(params?:any){
        return http.post(api.getReCommentArticle,params)
    },

    
    

    //话题
    topicListApi:(params?:any)=>{
        return http.post(api.topicList,params)
    },

    //收藏
    collectListByUserApi:(params?:any)=>{
        return http.post(api.collectListByUser,params)
    },
    changeCollectStatusApi:(params?:any)=>{
        return http.post(api.changeCollectStatus,params)
    },

    //点赞
    likeArticleListByUserApi:(params?:any)=>{
        return http.post(api.likeArticleListByUser,params)
    },
    changeLikeArticleStatusApi:(params?:any)=>{
        return http.post(api.changeLikeArticleStatus,params)
    },

    //关注-粉丝
    subscribeByUserApi:(params?:any)=>{
        return http.post(api.subscribeByUser,params)
    },
    changeSubscribeStatusApi:(params?:any)=>{
        return http.post(api.changeSubscribeStatus,params)
    },


    //评论
    getCommentByArticleApi:(params?:any)=>{
        return http.post(api.getCommentByArticle,params)
    },
    getReplyByCommentApi:(params?:any)=>{
        return http.post(api.getReplyByComment,params)
    },
    createCommentApi:(params?:any)=>{
        return http.post(api.createComment,params)
    },
    deleteCommentApi:(params?:any)=>{
        return http.post(api.deleteComment,params)
    },
    

    // 消息通知
    getMsgByUserApi:(params?:any)=>{
        return http.post(api.getMsgByUser,params)
    },
    createMsgApi:(params?:any)=>{
        return http.post(api.createMsg,params)
    },
    changeReadStatusApi:(params?:any)=>{
        return http.post(api.changeReadStatus,params)
    },
    UserDeleteMsgApi:(params?:any)=>{
        return http.post(api.UserDeleteMsg,params)
    },
    getNoticeMsgApi:(params?:any)=>{
        return http.post(api.getNoticeMsg,params)
    },
    createNoticeMsgApi:(params?:any)=>{
        return http.post(api.createNoticeMsg,params)
    },
    updateNoticeMsgApi:(params?:any)=>{
        return http.post(api.updateNoticeMsg,params)
    },
    consoleDelMsgApi:(params?:any)=>{
        return http.post(api.consoleDelMsg,params)
    },

    

}

export default requestList




